package com.jn.erp.web.api.student.controller;


import com.jn.erp.common.core.result.AjaxResult;
import com.jn.erp.security.controller.BaseWebAuthController;
import com.jn.erp.web.api.student.entity.TStudentCourseSale;
import com.jn.erp.web.api.student.entity.dto.TStudentCourseDto;
import com.jn.erp.web.api.student.entity.vo.TStudentCourseVo;
import com.jn.erp.web.api.student.service.TStudentCourseSaleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author wyp
 * @since 2024-09-29
 */
@RestController
@RequestMapping("/tStudentCourseSale")
public class TStudentCourseSaleController extends BaseWebAuthController {
    @Autowired
    private TStudentCourseSaleService tStudentCourseSaleService;
    /**
     * 业绩归属人修改
     */
    @PostMapping("/update")
    public AjaxResult StudentCourseSaleUpdate(@RequestBody TStudentCourseVo tStudentCourseVo) {
        //机构id
        tStudentCourseVo.setOrgId(Long.parseLong(loginDeptAuth()) );
        //当前登录人id
        tStudentCourseVo.setEditor(getUserId());
        String code= tStudentCourseSaleService.StudentCourseSaleUpdate(tStudentCourseVo);
        return AjaxResult.success(code);
    }
}

